<template>
  <div class="bc" v-bind:style="{'height':clientHeight + 'px'}">
    <top></top>
    <menuList></menuList>
    <div class="input-button password" @click="editpass">修改密码</div>
    <router-link to="/person">
      <div class="input-button password">返回首页</div>
    </router-link>
    <div class="input-button leave" @click="unlogin">退出登录</div>
  </div>
</template>

<script>
import top from '../../components/home/top'
import menuList from '../../components/home/menu'
import {Confirm} from 'vue-ydui/dist/lib.rem/dialog'
import {delStorage} from '../../util/Cookies'

export default {
  components: {top, menuList},
  data () {
    return {
      clientHeight: document.documentElement.clientHeight
    }
  },
  methods: {
    unlogin: function () {
      Confirm({
        mes: '是否确认退出账户',
        opts: () => {
          delStorage('updateUserId')
          this.$router.push({path: '/login'})
          /*          VXLOGINOUT(this.$store.getters.uid).then(
              res => {
                console.log(res.data)
                if (res.data.code === 200) {
                  //  console.log(res.data)
                  Toast({mes: ' 退出成功 ', timeout: 1000})
                  this.$router.push({path: '/login'})
                } else {
                  console.log(res.data.code)
                  //  Toast({mes: res.data.msg, timeout: 1000})
                }
              },
              error => {
                console.log(error)
              }) */
        }
      })
    },
    editpass: function () {
      Confirm({
        mes: '是否确认修改密码',
        opts: () => {
          this.$router.push({path: '/register/FORGETPWD'})
        }
      })
    }
  }
}

</script>

<style scoped>
  .bc {
    background-color: #eff0f1;
    padding-top: 0.2rem;
  }

  .password {
    background-color: #fff;
    color: #38adff;
    box-shadow: 0 0 0.2rem 0.1rem rgba(194, 198, 199, 0.1);
    border-radius: 0.1rem;
    margin-top: 0.2rem;
  }

  .leave {
    margin-top: 0.8rem;
    box-shadow: 0 0 0.2rem 0.1rem rgba(194, 198, 199, 0.1);
    border-radius: 0.1rem;
    background-color: #38adff;
  }
</style>
